export function calcRender(current, total, pageSize = 10) {
  const totalPages = Math.ceil(total / pageSize)
  if (totalPages <= 6) {
    let str = ''
    for (let i = 1; i <= totalPages; i++) {
      str = str + ' ' + i
    }
    return str
  } else {
    if (current < 5) {
      return `1 2 3 4 5 N ${totalPages}`
    } else if (totalPages == 7) {
      return '1 N 3 4 5 6 7'
    } else if (totalPages == 8) {
      return '1 N 4 5 6 7 8'
    } else {
      if (totalPages - current >= 4) {
        return `1 N ${current - 2} ${current - 1} ${current} ${current + 1} ${current + 2} N ${totalPages}`
      } else {
        return `1 N ${totalPages - 4} ${totalPages - 3} ${totalPages - 2} ${totalPages - 1} ${totalPages}`
      }
    }
  }
}
